Public Class HocSinh
    Protected HoTen As String
    Protected NgaySinh As Date
    Protected DiaChi As String
    Protected email As String
    'cac cau lenh property
    Property _HoTen() As String
        Get
            Return Me.HoTen
        End Get
        Set(ByVal value As String)
            Me.HoTen = value
        End Set
    End Property
    Property _NgaySinh() As Date
        Get
            Return Me.NgaySinh
        End Get
        Set(ByVal value As Date)
            Me.NgaySinh = value
        End Set
    End Property
    Property _DiaChi() As String
        Get
            Return Me.DiaChi
        End Get
        Set(ByVal value As String)
            Me.DiaChi = value
        End Set
    End Property
    Property _email() As String
        Get
            Return Me.email
        End Get
        Set(ByVal value As String)
            Me.email = value
        End Set
    End Property
    'nhap
    Public Shared Function Nhap() As HocSinh
        Dim hs As New HocSinh
        Console.Write("nhap ten hoc sinh: ")
        hs.HoTen = Console.ReadLine()
        Console.Write("nhap ngay sinh hoc sinh: ")
        hs.NgaySinh = Console.ReadLine()
        Console.Write("nhap dia chi: ")
        hs.DiaChi = Console.ReadLine()
        Console.Write("nhap email : ")
        hs.email = Console.ReadLine()
        Return hs
    End Function
    'xuat
    Public Function Xuat() As String
        Dim str As String = "            +Ho ten   : " & Me._HoTen & vbCrLf
        str &= "            +Ngay Sinh: " + Me.NgaySinh.Day.ToString() + "/" + Me.NgaySinh.Month.ToString() + "/" + Me.NgaySinh.Year.ToString() & vbCrLf 
        str &= "            +Dia chi  : " & Me.DiaChi & vbCrLf
        str &= "            +Email    : " & Me.email & vbCrLf
        Return str
    End Function


End Class
